<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<html>
<head>

    <title>Add/edit user</title>

    <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
    <link rel="stylesheet" href="css/common.css"/>

</head>

<body>
<f:view>
    <f:loadBundle basename="ResourceBundle" var="bundle"/>
    <h:form id="addNewUserForm">
        <div align="center">
            <div style="position:absolute;;left:40%;width:400px; top:10%; height: 600px;background: #e8e7e9">
                <h2><strong>Add/edit user</strong></h2>

                <div style="position:absolute;top: 10%;left: 10%; width: 80%; background: #7ccff5">
                    <br>
                    <h:outputText value="#{bundle.MSIDSN}" styleClass="labels"/>
                    <h:inputText value="#{userBean.MSIDSN}" styleClass="fields" readonly="true"/>
                    <br>
                    <br>
                    <h:outputText value="#{bundle.activity}" styleClass="labels"/>
                    <h:inputText value="#{userBean.activity}" styleClass="fields" readonly="true"/>
                    <br>
                    <br>
                    <h:outputText value="#{bundle.registrationDay}" styleClass="labels"/>
                    <h:inputText value="#{userBean.registrationDay}" styleClass="fields" readonly="true"/>
                    <br>
                    <br>
                    <h:outputText value="#{bundle.sex}" styleClass="labels"/>
                    <h:selectOneMenu value="#{userBean.currentSex}" styleClass="fields">
                        <f:selectItems value="#{userBean.sexes}"/>
                    </h:selectOneMenu>
                    <br>
                    <br>
                    <h:outputText value="#{bundle.ARPU}" styleClass="labels"/>
                    <h:inputText value="#{userBean.ARPU}" styleClass="fields"/>
                    <br>
                    <br>
                    <h:outputText value="#{bundle.old}" styleClass="labels"/>
                    <h:inputText value="#{userBean.old}" styleClass="fields"/>
                    <br>
                    <br>
                    <h:outputText value="#{bundle.region}" styleClass="labels"/>
                    <h:selectOneMenu value="#{userBean.currentRegion}" styleClass="fields">
                        <f:selectItems value="#{userBean.regions}"/>
                    </h:selectOneMenu>
                    <br>
                    <br>
                    <h:outputText value="#{bundle.birthday}" styleClass="labels"/>
                    <h:inputText value="#{userBean.old}" styleClass="fields"/>
                    <br>
                    <br>
                    <h:outputText value="#{bundle.userId}" styleClass="labels"/>
                    <h:inputText value="#{userBean.newUserId}" styleClass="fields" readonly="true"/>
                    <br>
                    <br>
                    <br>
                    <h:panelGrid columns="2" width="100%">
                        <h:commandButton value="#{bundle.saveButton}" action="#{userBean.saveEditUser}"
                                         styleClass="add-content-save-cancel"/>
                        <h:commandButton value="#{bundle.cancelButton}" action="#{userBean.toUserDB}"
                                         styleClass="add-content-save-cancel"/>
                    </h:panelGrid>
                </div>
            </div>
        </div>
    </h:form>
</f:view>
</body>
</html>